package com.example.task;

import com.example.websocket.WebSocketProcess;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;


@Component
public class WebTask {

    @Autowired
    private WebSocketProcess webSocketProcess;

    @Scheduled(cron = "*/50 * * * * ?")
    private void configureTasks() throws Exception{
        webSocketProcess.sendAllMessage("ping");
    }
}